all: makedist

makedist: main.o parser.o Node.o graph.o workStealing.o
	mpic++ -Wextra -Wall -g -lpthread Node.o parser.o main.o graph.o workStealing.o -o makedist
main.o: main.cpp
	mpic++ -Wextra -Wall -g -c main.cpp
parser.o: parser.cpp
	mpic++ -Wextra -Wall -g -c parser.cpp
Node.o: Node.cpp
	mpic++ -Wextra -Wall -g -c Node.cpp
graph.o: graph.cpp
	mpic++ -Wextra -Wall -g -c graph.cpp
workStealing.o: workStealing.cpp
	mpic++ -Wextra -Wall -g -c workStealing.cpp
clean:
	rm -f *.o
distclean: clean
	rm -f parser.o main.o makedist
test:
	rm -f makedist2
	lamboot -v hosts.txt
	mpirun -np 2 ./makedist
	diff makedist makedist2
